package org.kinglone.back.classify.service;

import java.math.BigInteger;

import org.hibernate.Query;
import org.kinglone.back.classify.model.Classify;
import org.kinglone.common.dao.impl.BaseDaoImpl;
import org.kinglone.common.util.PageQuery;
import org.kinglone.common.util.PageResults;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Administrator on 2017/10/16.
 */
@Service("classifyService")
@Transactional(readOnly=false)
public class ClassifyServiceImpl extends BaseDaoImpl<Classify> implements ClassifyService {

	@Override
	public PageResults<Classify> findClassifyByPage(PageQuery pageQuery) {
		String hql = "from Classify c order by c.createTime desc";
		String countHql="select count(0) from Classify";
		PageResults<Classify> pageResults =  super.findPageByFetchedHql(hql, countHql, pageQuery, null);
		return pageResults;
	}

}
